import {
  blogCategoryGet,
  blogCategoryPost,
  blogCategoryPut,
  blogCategoryDelete,
  commentGet,
  commentDelete,
  articleGet,
  articlePost,
  articlePut,
  articleDelete,
  siteGet,
  sitePost,
  sitePut,
  siteDelete,
  blogSiteCategoryGet,
  blogSiteCategoryPost,
  blogSiteCategoryPut,
  blogSiteCategoryDelete
} from '@/api/blogApi'
const blog = {
  namespaced: true,
  state: {
  },
  getters: {},
  mutations: {
  },
  actions: {
    BlogCategoryGet ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogCategoryGet(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogCategoryPost ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogCategoryPost(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogCategoryPut ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogCategoryPut(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogCategoryDelete ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogCategoryDelete(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    CommentGet ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        commentGet(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    CommentDelete ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        commentDelete(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    ArticleGet ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        articleGet(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    ArticlePost ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        articlePost(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    ArticlePut ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        articlePut(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    ArticleDelete ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        articleDelete(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    SiteGet ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        siteGet(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    SitePost ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        sitePost(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    SitePut ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        sitePut(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    SiteDelete ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        siteDelete(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogSiteCategoryGet ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogSiteCategoryGet(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogSiteCategoryPost ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogSiteCategoryPost(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogSiteCategoryPut ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogSiteCategoryPut(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    BlogSiteCategoryDelete ({ state, commit, dispatch }, params) {
      return new Promise((resolve, reject) => {
        blogSiteCategoryDelete(params).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    }
  }
}
export default blog
